package org.apache.flink.runtime.resourceconsumer;

import org.apache.flink.runtime.registration.RegistrationResponse;

/**
 * Message indicating a registration rejection from the {@link ResourceConsumer} for the 资源提供者
 * 
 */
public class RCRPRegistrationRejection extends RegistrationResponse.Rejection {
    private static final long serialVersionUID = -5763721635090700901L;

    private final String reason;

    public RCRPRegistrationRejection(String reason) {
        this.reason = reason;
    }

    public String getReason() {
        return reason;
    }

    @Override
    public String toString() {
        return "The ResourceConsumer has rejected the registration attempt because: " + reason;
    }
}
